package com.srpingde.hhh.adapter;

import java.util.List;

import com.springde.hhh.R;
import com.srpingde.hhh.bean.MeiWenDataBean;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class HHHFenLeiAdapter extends BaseAdapter {
	Context context;
	List<MeiWenDataBean> WeiQuFenLeiBean;
	public HHHFenLeiAdapter(Context context,List<MeiWenDataBean> WeiQuFenLeiBean) {
		super();
		this.context = context;
		this.WeiQuFenLeiBean = WeiQuFenLeiBean;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return WeiQuFenLeiBean.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		WeiQuFenLeiHolder holder = null;
		if(convertView == null){
			convertView = LayoutInflater.from(context).inflate(R.layout.weiqufenlei_item, null);
			holder = new WeiQuFenLeiHolder();
			holder.title = (TextView) convertView.findViewById(R.id.biaoti);
			holder.time = (TextView) convertView.findViewById(R.id.time);
			convertView.setTag(holder);
		}else{
			holder = (WeiQuFenLeiHolder) convertView.getTag();
		}
		MeiWenDataBean bean = WeiQuFenLeiBean.get(position);
		holder.title.setText(bean.getTitle());
		return convertView;
	}
	class WeiQuFenLeiHolder{
		TextView title;
		TextView time;
	}
}
